using System;
using System.Collections.Generic;
using System.Text;

namespace AppExtensions.Exceptions
{
    [global::System.Serializable]
    public class ConnectionStringProviderNameMissingException : Exception
    {
        //
        // For guidelines regarding the creation of new exception types, see
        //    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp
        // and
        //    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp
        //

        private static readonly string message = "The ProviderName attribute of the connection string \"{0}\" is unknown.";

        public ConnectionStringProviderNameMissingException() { }
        public ConnectionStringProviderNameMissingException(string connectionStringName) : this(message, null) {}
        public ConnectionStringProviderNameMissingException(string connectionStringName, Exception inner)
            : base(string.Format(message, connectionStringName), inner) 
        {
            this.connectionStringName = connectionStringName;
        }
        protected ConnectionStringProviderNameMissingException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }


        private string connectionStringName;

        public string ConnectionStringName
        {
            get { return connectionStringName; }
        }
	
    }
}
